# -*- coding: UTF-8 -*-
import game.elements.props.equipment as CEQUIP
class RoleData:
    def __init__(self,role_data_dict):
        self.id = role_data_dict["id"]
        self.name = role_data_dict["name"]
        self.hp = role_data_dict["hp"]
        self.mp = role_data_dict["mp"]
        self.atk = role_data_dict["atk"]
        self.dfd = role_data_dict["dfd"]
        self.spd = role_data_dict["spd"]
         
        self.sight_range = role_data_dict["sight_range"]
        #dict
        self.equip = role_data_dict["equip"]
        #self.props = role_data_dict["props"]
        self.pos =role_data_dict["xyz"]
        self.loc = role_data_dict["hpr"]
    
    def getRealValue(self):
        self.real_atk =self.atk+ self.equip["weapon"]["atk"]+ self.equip["armor"]["atk"] + self.equip["boost"]["atk"]
        self.real_defend = self.dfd + self.equip["armor"]["dfd"]+self.equip["boost"]["dfd"]
        self.real_speed = self.spd+ self.equip["boost"]["spd"]
        self.real_atk_range = self.equip["weapon"]["atk_rng"]
    